<template>
  <el-dialog
    v-model="detailLogVisible"
    draggable
    @close="detailLogVisible = false"
    title="详情"
    width="80%"
  >
    <jm-table
      v-if="detailLogVisible"
      :isCustomWidth="false"
      :hasRefresh="false"
      :hasAction="true"
      max-height="500px"
      ref="tableLogRef"
      :columns="OPERA_LOG"
      :apiParams="paramsData"
      url="/dataApi/role/getRoleExecuteLog"
    />
  </el-dialog>
</template>
<script setup>
import { ref, reactive } from 'vue'
const paramsData = ref({})
const OPERA_LOG = [
  {
    label: '变更内容',
    prop: 'remark'
  },
  {
    label: '执行人',
    prop: 'userName'
  },
  {
    label: '时间',
    prop: 'time'
  }
]
const tableLogRef = ref(null)
const detailLogVisible = ref(false)
const searchState = reactive({})
const detailLogOperate = (flag, id) => {
  paramsData.value = {
    id: id || null
  }
  detailLogVisible.value = flag
}
defineExpose({
  detailLogOperate
})
</script>
